using System;
using System.Collections.Generic;
using System.Reflection;
using Castle.ActiveRecord;

namespace WineCellar.Web.Common
{
    public class Utility
    {
        public static List<string> GetQueryCriteria(Type inputType)
        {                                                        
            MemberInfo[] myMembers = inputType.GetMembers();
            List<string> returnValues = new List<string>();
            foreach (MemberInfo info in myMembers)
            {                                        
              if (info.IsDefined(typeof(PropertyAttribute),false))
              {
                  returnValues.Add(info.Name);
              }
            }
            return returnValues;
         }            
   }        
}               